package cn.trigram.exception;

public abstract class BenefitToolException extends RuntimeException {

  /**
   * 异常码
   */
  private int code;

  /**
   * http状态码
   */
  private int statusCode = 500;

  public BenefitToolException() {

  }

  public BenefitToolException(String message, int code) {

    super(message);
    this.code = code;
  }

  public BenefitToolException(String message) {

    super(message);
  }

  public BenefitToolException(Throwable cause) {

    super(cause);
    super.addSuppressed(cause);
  }
  public BenefitToolException(String message, Throwable cause) {

    super(message, cause);
    super.addSuppressed(cause);
  }

  public BenefitToolException(String message, int code, Throwable cause) {

    super(message, cause);
    this.code = code;
    super.addSuppressed(cause);
  }

  public int getCode() {

    return code;
  }

  public void setCode(int code) {

    this.code = code;
  }

  public int getStatusCode() {

    return statusCode;
  }

  public void setStatusCode(int statusCode) {

    this.statusCode = statusCode;
  }

}
